<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>电子商城</title>
    <style>
        html,
        body {
            margin: 0;
            padding: 0;
        }

        body {
            background-color: #f2f2f2;
        }

        .title {
            text-align: center;
            font-size: 20px;
        }

        #content {
            margin: 0 auto;
            height: 349px;
            width: 388px;
            background-color: #FFF;
            position: relative;
            top: 75px;
            border-radius: 10px;
            padding: 50px 0 0 30px;
        }

        .userinfo ul {
            list-style-type: none;
        }

        .userinfo ul li {
            height: 30px;
        }

        .button_img {
            margin-left: 35px;
            margin-top: 10px;
        }
    </style>
</head>

<body>
<%
    int flag = 0;
    if(request.getSession().getAttribute("flag") != null)
        flag = (int)request.getSession().getAttribute("flag");
    if (flag == 12)
        out.print("<script>alert('用户ID已存在！')</script>");
    else if (flag == 14)
        out.print("<script>alert('注册失败！')</script>");
    request.getSession().setAttribute("flag", 0);
%>
    <div id="content">
        <div class="userinfo">
            <div class="title">用户注册</div>
            <form id="memberModify_action" name="memberRegisterForm" onsubmit="return true;" action="/UserRegister" method="post">
                <input type="hidden" name="member.id" value="3" id="memberModify_action_member_id" />
                <ul>
                    <li><span>用&nbsp;户&nbsp;名&nbsp;:&nbsp;&nbsp;&nbsp;</span><input type="text" name="member.username" placeholder="请输入用户名" id="memberModify_action_member_username" />
                    </li>
                    <li><span>真实姓名：</span><input type="text" name="member.realname" placeholder="请输入真实姓名"
                            id="memberModify_action_member_realname" />
                    </li>
                    <li><span>所在城市：</span><input type="text" name="member.city" placeholder="请输入所在城市"
                            id="memberModify_action_member_city" />
                    </li>
                    <li><span>邮政编码：</span><input type="text" name="member.postcode" placeholder="请输入邮政编码"
                            id="memberModify_action_member_postcode" />
                    </li>
                    <li><span>证件号码：</span><input type="text" name="member.cardno" placeholder="请输入您的证件号码"
                            id="memberModify_action_member_cardno" />
                    </li>
                    <li><span>证件类别：</span><input type="radio" name="member.cardtype"
                            id="memberModify_action_member_cardtype身份证" value="0" /><label
                            for="memberModify_action_member_cardtype身份证">身份证</label>
                        <input type="radio" name="member.cardtype" id="memberModify_action_member_cardtype军官证"
                            value="1" /><label for="memberModify_action_member_cardtype军官证">军官证</label>
                        <input type="radio" name="member.cardtype" id="memberModify_action_member_cardtype学生证"
                            value="2" /><label for="memberModify_action_member_cardtype学生证">学生证</label>

                    </li>
                    <li><span>联系电话：</span><input type="text" name="member.tel" placeholder="请输入联系电话"
                            id="memberModify_action_member_tel" />
                    <li><span>&nbsp;&nbsp;&nbsp;Email&nbsp;&nbsp;:&nbsp;&nbsp;</span><input type="text"
                            name="member.email" placeholder="请输入电子邮件" id="memberModify_action_member_email" />
                    </li>
                    <li class="button_img">
                        <input src="images/12.gif" type="image" style="CURSOR:hand" />
                        <img src="images/13.gif" onclick="document.memberRegisterForm.reset();" style="CURSOR:hand" />
                    </li>
                </ul>
            </form>

        </div>
    </div>
</body>
</html>